package main

import "fmt"

func main() {
	all()

	//声明变量
	//var a string
	//var b int
	//var c bool
	//var d float32
	//fmt.Printf("a=%d b=%t c=%s d=%f\n", a, b, c, d)

	//赋值
	//a = "hello word"
	//b = 100
	//c = true
	//d = 555
	//fmt.Printf("a=%d b=%t c=%s d=%f\n", a, b, c, d)

	//优雅的方式
	//var(
	// a string
	// b int
	// c bool
	// d float32
	//)
	//fmt.Printf("a=%d b=%t c=%s d=%f\n", a,b,c,d)
}

//批量复制
func all() {
	var (
		a int
		b int
		c string
	)
	a, b, c = 1, 2, "dd"
	fmt.Printf("a=%v b=%v c=%v \n", a, b, c)

	d, n, f := 1, 2, "dd"
	fmt.Printf("d=%v n=%v f=%v \n", d, n, f)
}
